import request from '@/utils/request' 
export default{
    //1.场次列表(分页查询)
    //current当前页  limit每页记录数  
    getSessionListPage(current,limit){
        return request({
            url:`/educoupon/seckillsession/pageList/${current}/${limit}`,
            method:'get',
        })
    },
    //商品列表(条件分页查询)
    //current当前页  limit每页记录数  id 商品id
    getSessionListPageCondition(current,limit,query){
        return request({
            url:`/educoupon/seckillsession/conditionPageList/${current}/${limit}`,
            method:'post',
            data:query
        })
    },
    //保存新建场次信息
    saveSession(goods){
        return request({
            url:`/educoupon/seckillsession/save`,
            method:'post',
            data:goods
        }) 
    },
    //更新场次信息
    updateSession(session){
        return request({
            url:`/educoupon/seckillsession/update`,
            method:'post',
            data:session
        }) 
    },
    //根据id删除场次
    deleteSessionId(id){
        return request({
            url:`/educoupon/seckillsession/delete`,
            method:'delete',
            data:[id]
        })
    },
    //关联商品查询分页
    goodsGetList(current,limit,promotionSessionId){
        return request({
            url:`/educoupon/seckillskurelation/pageList/${current}/${limit}/${promotionSessionId}`,
            method:'get',
        })
    },
    //关联商品条件查询分页
    getListCondition(current,limit,promotionSessionId){
        return request({
            url:`/educoupon/seckillskurelation/conditionPageList/${current}/${limit}/${promotionSessionId}`,
            method:'post',
            data:{
            }
        })
    },
    //保存关联商品信息
    saveGoods(good){
        return request({
            url:`/educoupon/seckillskurelation/save`,
            method:'post',
            data:good
        })
    },
     //根据id删除关联商品
     deleteGoodById(id){
        return request({
            url:`/educoupon/seckillskurelation/delete`,
            method:'delete',
            data:[id]
        })
    },
    //修改关联商品
    updateGoods(good){
        return request({
            url:`/educoupon/seckillskurelation/update`,
            method:'post',
            data:good
        })
    },
   
}